package com.goal98
class Team extends TopicEntity {

    League league

    static hasMany = [players:Player, posts:TeamPost, homeMatches:SoccerMatch, awayMatches:SoccerMatch]
    static mappedBy = [homeMatches:'homeTeam', awayMatches:'awayTeam']

    static constraints = {
        league(nullable:true)
    }

    public String toString() {
        return name
    }


}
